<%--
  @author  lk
  DateTime: 2020/6/23 19:49
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@include file="priv.jsp"%>

<html>
<head>
    <title>修改密码</title>
</head>
<body>
<script type="text/javascript">
    function checkpassword() {
        var password = document.getElementById("pw").value;
        var repassword = document.getElementById("repw").value;

        if(password == repassword) {
            document.getElementById("tishi").innerHTML="<br><font color='green'>两次密码输入一致</font>";
            document.getElementById("submit").disabled = false;

        }else {
            document.getElementById("tishi").innerHTML="<br><font color='red'>两次输入密码不一致!</font>";
            document.getElementById("submit").disabled = true;
        }
    }
</script>
<h2 style="text-align: center">修改密码</h2>
<hr>
<center>
    <form action="user" method="post" >
        <table  >
            <input type="hidden" name="flag" value="p" >
            <tr>
                <th>输入旧密码</th>
                <td><input type="password" id="oldpw" name="password"></td>
            </tr>
            <tr>
                <th>输入新密码</th>
                <td><input type="password" id="pw" name="newpassword"></td>
            </tr>
            <tr>
                <th>重复新密码</th>
                <td><input type="password" id="repw" name="newpassword1" onkeyup="checkpassword()" ><span id="tishi"></span></td>
            </tr>
            <tr>
                <td><input type="submit" id="edipwdsub" value="确认"></td>
            </tr>
        </table>
    </form>
</center>
</body>
</html>
